//
//  KDHomeInfoModel.m
//  PublicSentimentMonitorSystem
//
//  Created by 魏强 on 15/6/12.
//  Copyright (c) 2015年 魏强. All rights reserved.
//  那个Info字典的模型

#import "KDHomeInfoModel.h"
#import "KDHomeThemeModel.h"
#import "KDHomeThemeLinkModel.h"
@implementation KDHomeInfoModel
+ (NSDictionary *)replacedKeyFromPropertyName
{
    return @{@"array1":@"1",
             @"array2":@"2",
             @"array3":@"3",
              @"array16":@"16",
             };
}

+ (NSDictionary *)objectClassInArray
{
    return @{@"array1":[KDHomeThemeModel class],
             @"array2":[KDHomeThemeModel class],
             @"array3":[KDHomeThemeModel class],
             @"array16":[KDHomeThemeModel class],
             };
}
/**
 *  @param array 哪一组模型
 *
 *  @return 获取到该组模型的ID
 */
- (NSInteger) idForNSArray:(NSArray *)array
{
    for (KDHomeThemeModel *model in array) {
        return model.parentid;
    }
    
    return 1;
}
- (KDHomeThemeLinkModel *)model1
{
    KDHomeThemeLinkModel *model = [[KDHomeThemeLinkModel alloc]init];
    model.ParentID = [self idForNSArray:self.array1];
    model.info = self.array1;
    return model;
}
- (KDHomeThemeLinkModel *)model2
{
    KDHomeThemeLinkModel *model = [[KDHomeThemeLinkModel alloc]init];
    model.ParentID = [self idForNSArray:self.array2];
    model.info = self.array2;
    return model;
}
- (KDHomeThemeLinkModel *)model3
{
    KDHomeThemeLinkModel *model = [[KDHomeThemeLinkModel alloc]init];
    model.ParentID = [self idForNSArray:self.array3];
    model.info = self.array3;
    return model;
}
- (KDHomeThemeLinkModel *)model16{
    KDHomeThemeLinkModel *model = [[KDHomeThemeLinkModel alloc]init];
    model.ParentID = 16;
    model.info = self.array16;
    return model;
}
@end
